/*
 *    Copyright © OpenAtom Foundation.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.inspur.edp.bff.spi.event.retrievedefault;


import com.inspur.edp.bff.api.manager.IFSManager;
import com.inspur.edp.bff.api.manager.context.RetrieveDefaultContext;
import com.inspur.edp.bff.entity.defaultvalue.VoDefaultValue;
import com.inspur.edp.bff.spi.AbstractFSAction;
import com.inspur.edp.bff.spi.action.retrievedefault.AbstractRetrieveDefaultAction;
import com.inspur.edp.bff.spi.action.retrievedefault.AfterRetrieveDefaultAction;
import com.inspur.edp.bff.spi.action.retrievedefault.BeforeRetrieveDefaultAction;
import com.inspur.edp.cef.entity.entity.IEntityData;
import com.inspur.edp.cef.spi.entity.info.propertyinfo.DataTypePropertyInfo;

import java.util.ArrayList;

public interface IBffRetrieveDefaultEventListener {
    void beforeRetrieveDefault(IFSManager manager, VoDefaultValue defaultValue, String dataId);

    void afterRetrieveDefault(IFSManager manager, IEntityData data);

    void beforeExecuteRetrieveDefaultActions(IFSManager manager, ArrayList<BeforeRetrieveDefaultAction> actions);

    void beforeRetrieveDefaultAction(IFSManager manager, AbstractFSAction action,
                                     RetrieveDefaultContext retrieveDefaultContext);

    void afterRetrieveDefaultAction(IFSManager manager, RetrieveDefaultContext retrieveDefaultContext);

    void afterExecuteRetrieveDefaultActions(IFSManager manager, ArrayList<BeforeRetrieveDefaultAction> actions);

    void beforeExecuteAfterRetrieveDefaultActions(IFSManager manager, ArrayList<AfterRetrieveDefaultAction> actions);

    void beforeAfterRetrieveDefaultAction(IFSManager manager, AbstractFSAction action,
                                          RetrieveDefaultContext retrieveDefaultContext);

    void afterAfterRetrieveDefaultAction(IFSManager manager, RetrieveDefaultContext retrieveDefaultContext);

    void afterExecuteAfterRetrieveDefaultActions(IFSManager manager, ArrayList<AfterRetrieveDefaultAction> actions);

    void beforeExecuteAbstractRetrieveDefaultActions(IFSManager manager, ArrayList<AbstractRetrieveDefaultAction> actions);

    void beforeAbstractRetrieveDefaultAction(IFSManager manager, AbstractFSAction action,
                                             RetrieveDefaultContext retrieveDefaultContext);

    void afterAbstractRetrieveDefaultAction(IFSManager manager, RetrieveDefaultContext retrieveDefaultContext);

    void afterAbstractRetrieveDefaultActions(IFSManager manager, ArrayList<AbstractRetrieveDefaultAction> actions);

    void beforeRetrieveDefaultChild(IFSManager manager, ArrayList<String> nodeCodes, ArrayList<String> lierachyIds, ArrayList<String> ids,
                                    ArrayList<VoDefaultValue> defaultValues);

    void afterRetrieveDfaultChild(IFSManager manager, ArrayList<IEntityData> data, ArrayList<String> nodeCodes);

    void beforeDefaultValue(IFSManager manager, VoDefaultValue defaultValue);

    void afterDefaultValue(IFSManager manager, ArrayList<IEntityData> data);

    void beforeMetaDefaultValue(IFSManager manager, DataTypePropertyInfo propertyInfo);

    void afterMetaDefaultValue(IFSManager manager, ArrayList<IEntityData> data);

    void exceptionStop(Exception e);
}
